<li id="class_<%= branch.id %>">
  <%
      # Хак для in_place_editor_field
  %>
  <% @object_and_resource_class = branch %>
  
  <%= @object_and_resource_class.name %>
  
  <%= link_to_remote image_tag('page_new.gif', :border => 0, :title => 'Добавить подкласс'), :url => { :action => 'new', :id => branch.id }, :update => 'new-object-and-resource-class-form-holder' %>
  <%= link_to_remote image_tag('page_edit.gif', :border => 0, :title => 'Редактировать класс'), :url => { :action => 'edit', :id => @object_and_resource_class.id }, :method => :get %> 
  <%= link_to_remote image_tag('page_cross.gif', :border => 0, :title => 'Удалить класс'), :url => { :action => 'destroy', :id => @object_and_resource_class.id }, :confirm => 'Вы действительно хотите удалить класс и все его подклассы?', :method => :delete %>
  
  <span id="object_and_resource_class_<%= @object_and_resource_class.id %>"></span>
  
  <% if branch.children.count > 0 %>
  <ul id="branch_<%= branch.id %>">
      <%= render(:partial => 'branch', :collection => branch.children) %>
  </ul>
  <%= sortable_element 'branch_' + branch.id.to_s, :url => { :action => 'sort', :id => branch.id }  %>
  <% end %>
</li>